Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't fail on unicode js newlines (\u2028, \u2029) #1655

Merged
merged 1 commit into from
Sep 5, 2014

Conversation

rlidwka
Copy link
Member

@rlidwka rlidwka commented Sep 5, 2014

If you ask me what is the most stupid standard in JavaScript world, I'd say JSON is second to none.

No comments allowed, no trailing commas (which constantly screws up git diffs), no good Date representation, \v is confusingly missing... did I forget anything?

Oh right, and JSON.stringify is broken in a way that its output can't be embedded in the JavaScript source code as is.

Bug report:
#1648

Details:
https://code.google.com/p/v8/issues/detail?id=1907

Same fix as in:
expressjs/express#1132

JSON isn't a proper subset of JavaScript, and JSON.stringify
is horribly broken by default.

So when those two characters were used, Jade was creating
a template with syntax error (with valid JSON, but invalid JS).
ForbesLindesay added a commit that referenced this pull request Sep 5, 2014
don't fail on unicode js newlines (\u2028, \u2029)
@ForbesLindesay ForbesLindesay merged commit 86cdb30 into pugjs:master Sep 5, 2014
@ForbesLindesay
Copy link
Member

Thanks, this is awesome work.

@ForbesLindesay
Copy link
Member

I've invited you to our maintainers team (I'm attempting to broaden the number of people who are able to help maintain the jade project). Please continue to submit patches via pull requests, but feel free to merge other people's pull requests if they are getting ignored and close issues as you see fit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants